<?$this->load->view('admin/tools/admin-header')?>
<?$this->load->view('admin/tools/admin-menu')?>
<?$this->load->view('admin/tools/admin-search-agenda')?>
<div class="wrap">
	<a href=""><div id="icon-index" class="icon32"><br /></div></a><br>
<h3><a>Manage -> Agenda</a></h3>

<?if($mode!="noerror"){echo"<div id='message' class='updated fade'><p>$pesan</p></div>";}?>
<div id="dashboard-widgets-wrap">
<form id="posts-filter" onsubmit="return confirm('Pastikan Data yang akan dihapus dalam keadaan tercentang.')" action="<?=site_url('paneladm/agendaadm/multi_hapus_agenda');?>" method="POST">
<table width="90%">
<tr>
	<td width="30px">
	<input type="submit" value="Delete" id="hapus" name="delete"/>
	</td>
	<td>
	<input type="button" value="Tambah Agenda" onclick="document.location='<?=site_url("paneladm/agendaadm/tulis_agenda")?>'"/>
	</td>
	
</tr>
</table>

<br class="clear" />
<table width="90%" >
	<thead>
	<tr style="background:#9b9b9b;color:yellow;font-family:arial;height:25px;">
		<th scope="col" class="th-view check-column"><input type="checkbox" /></th>
		<th scope="col" class="th-view" >No</th>
		<th scope="col" class="th-view" width="10%">Tipe</th>
		<th scope="col" class="th-view" width="25%">Judul</th>
		<th scope="col" class="th-view" width="35%">Isi</th>
		<th scope="col" class="th-view" width="20%">Tanggal</th>
		<th scope="col" class="th-view" width="10%">Aksi</th>
	</tr>
	</thead>
	<tbody>
	
	<?
	$i=1;
	$uri = $this->uri->segment(3);
	if($uri==null){$uri=0;}
	foreach ($query as $row)
		{
			$id			= $row->id;
			$date 		= $row->newdate;
			$judul		= $row->judul;
			$isi	 	= $row->isi;
			$tipe		= $row->tipe_agenda;
			
			$tipe 		= ucwords(str_replace("_"," ",$tipe));
	?>
			
	<tr style="background:#FFFFFF" valign="center">
		<th scope="row" class="check-column td-view"><input type="checkbox" name="cekbok[]" value="<?=$id?>" /></th>
		<td class="td-view"><?=($i+$uri);?></td>	
		<td width="10%" class="td-view"><?=$tipe;?></td>
		<td width="25%" class="td-view"><?=$judul;?></td>		
		<td width="35%" class="td-view"><?=$isi;?></td>
		<td width="20%" class="td-view" align="center"><?=$date;?></td>
		<td width="10%" class="td-view" align="center"><a href="<?=site_url('paneladm/agendaadm/edit_agenda/'.$id)?>" title="Edit Agenda"><img src="<?=base_url()?>css/icon/edit.png"></a>&nbsp;|&nbsp;<a href="<?=site_url('paneladm/agendaadm/hapus_agenda/'.$id)?>" title="Delete Agenda"><img src="<?=base_url()?>css/icon/delete.png"></a></td>
		</tr>
		<?$i++;}?>
	</tbody>
</table>
<table width="250" align="center" border="1">
		<tr style="background:">
			<td width="250" valign="middle" align="center">
			<font face="verdana" size="2" color="#FF0000">
				<div style="float:left">
				<center>Banyak Data : <b><?=$jumlah?></b></center>
				<center><a><?echo $this->pagination->create_links();?></a></center>
			</div></font>
			</td>
		</tr>
</table>

</form>
</div>
</div><!-- wrap -->


<div class="clear"></div></div><!-- wpbody-content -->
<div class="clear"></div></div><!-- wpbody -->
<div class="clear"></div></div><!-- wpcontent -->
</div><!-- wpwrap -->

<!--admin-footer-->
<?$this->load->view('admin/tools/admin-footer');?>
<!--admin-footer-->
